Face detection in digital images

ABSTRACT

The present invention discloses the detection of faces in digital images. Rather than subjecting the entire image ( 1 ) to computationally intensive face detection analysis, the image is instead segmented into regions ( 2 ) each of which has a substantially homogeneous colour. Only those regions ( 2 ) having a predominantly skin colour are then subjected to the face detection analysis. Preferably the face detection analysis is independent of facial colour.

TECHNICAL FIELD OF THE INVENTION

[0001] The present invention relates to digital colour images and, in particular, to the detection of faces in colour digital images.

[0002] Colour digital images are increasingly being stored in multi-media databases, and utilised in various computer applications. In many such applications it is desirable to be able to detect the location of a face in a visual image as one step in a multi-step process. The multi-step process can include content-based image retrieval, personal identification or verification for use with automatic teller machines or security cameras, or automated interaction between humans and computational devices.

BACKGROUND ART

[0003] Various prior art face detection methods are known including eigenfaces, neural networks, clustering, feature identification and skin colour techniques. Each of these techniques has its strengths and weaknesses, however, one feature which they have in common is that they are computationally intensive and therefore very slow, or they are fast but not sufficiently robust to detect faces.

[0004] The eigenface or eigenvector method is particularly suitable for face recognition and there is some tolerance for lighting variation, however it does not cope with different viewpoints of faces and does not handle occlusion of various facial features (such as occurs if a person is wearing sunglasses). Also it is not scale invariant.

[0005] The neural network approach utilises training based on a large number of face images and non-face images and has the advantages of being relatively simple to implement, providing some tolerance to the occlusion of facial features and some tolerance to lighting variation. It is also relatively easy to improve the detection rate by re-training the neural network using false detections. However, it is not scale invariant, does not cope with different viewpoints or orientation, and leads to an exhaustive process to locate faces on an image.

[0006] The clustering technique is somewhat similar to the eigenface approach. A pixel window (eg 20×20) is typically moved over the image and the distance between the resulting test pattern and a prototype face image and a prototype non-face image is represented by a vector. The vector captures the similarity and differences between the test pattern and the face model. A neural network can then be trained to classify as to whether the vector represents a face or a non-face. While this method is robust, it does not cope with different scales, different viewpoints or orientations. It leads to an exhaustive approach to locate faces and relies upon assumed parameters.

[0007] The feature identification method is based upon searching for potential facial features or groups of facial features such as eyebrows, eyes, nose and mouth. The detection process involves identifying facial features and grouping these features into feature pairs, partial face groups, or face candidates. This process is advantageous in that it is relatively scale invariant, there is no exhaustive searching, it is able to handle the occlusion of some facial features and it is also able to handle different viewpoints and orientations. Its main disadvantages are that there are potentially many false detections and that its performance is very dependent upon the facial feature detection algorithms used.

[0008] The use of skin colour to detect human faces is described in a paper by Yang J and Waibel A (1995) “Tracking Human Faces in Real-Time” CMU-CS-95-210, School of Computer Science, Carnegie Mellon University. This proposal was based on the concept that the human visual system adapts to different brightnesses and illumination sources which implies that the human perception of colour is consistent within a wide range of environmental lighting conditions. It was therefore thought possible to remove brightness from the skin colour representation while preserving accurate, but low dimensional, colour information. As a consequence, in this prior art technique, the chromatic colour space was used. Chromatic colours (eg r and g) can be derived from the RGB values as:

r=R/(R+G+B) and g=G/(R+G+B)

[0009] These chromatic colours are known as “pure” colours in the absence of brightness.

[0010] Utilising this colour space, Yang and Waibel found the distribution of skin colour of different people, including both different persons and different races, was clustered together. This means that the skin colours of different people are very close and that the main differences are in differences of intensity.

[0011] This prior art method first of all generated a skin colour distribution model using a set of example face images from which skin colour regions were manually selected. Then the test image was converted to the chromatic colour space. Next each image in the test image (as converted) was then compared to the distribution of the skin colour model. Finally, all skin colour pixels so detected were identified, and regions of adjacent skin colour pixels could then be considered potential face candidates.

[0012] This prior art method has the advantage that processing colour is much faster than processing individual facial features, that colour is substantially orientation invariant and that it is insensitive to the occlusions of some facial features. The system is also substantially viewpoint invariant and scale invariant. However, the method suffers from a number of disadvantages including that the colour representation of the face can be influenced by different lighting conditions, and that different cameras (eg digital or film) can produce different colour values even for the same person in the same environment.

[0013] However a significant disadvantage of the prior art methods is that the skin colour model is not very discriminating (ie selecting pixels on a basis of whether they are included in the skin colour distribution results in a lot of non-skin colour pixels being included erroneously). It is also difficult to locate clusters or regions of skin colour pixels that can be considered as candidate faces.

DISCLOSURE OF THE INVENTION

[0014] An object of the present invention is to provide an improved method of detecting one or more faces in digital colour images.

[0015] In accordance with a first aspect of the present invention there is disclosed a method of detecting a face in a colour digital image, said method comprising the steps of:

[0016] 1. segmenting said image into a plurality of regions each having a substantially homogenous colour,

[0017] 2. testing the colour of each said region created in step 1 to determine those regions having predominantly skin colour, and

[0018] 3. subjecting only the regions determined in step 2 to further facial feature analysis whereby said regions created in step 1 not having a predominantly skin colour are not subjected to said further feature analysis.

[0019] Preferably the above described method includes the further step of using in step 2 a colour distribution model utilising previously characterised sampled data.

[0020] Still further, step 2 preferably also includes the use of a more well defined colour distribution model for a particular image (eg flash or non-flash) based on information provided from the image source (eg a camera).

[0021] Preferably the further facial feature analysis is independent of facial colour.

[0022] In accordance with a second aspect of the present invention there is disclosed apparatus for detecting a face in a colour digital image, said apparatus comprising,

[0023] segmenting means to segment said image into a plurality of regions each having a substantially homogeneous colour,

[0024] colour detecting means coupled to said segmenting means to determine those regions having predominantly skin colour,

[0025] analysis means coupled to said colour detection means to subject only those regions having predominantly skin colour to a facial feature analysis.

[0026] In accordance with a third aspect of the present invention there is disclosed a computer readable medium incorporating a computer program product for detecting a face in a colour digital image, said computer program product including a sequence of computer implementable instructions for carrying out the steps of:

[0027] 1. segmenting said image into a plurality of regions each having a substantially homogenous colour,

[0028] 2. testing the colour of each said region created in step 1 to determine those regions having predominantly skin colour, and

[0029] 3. subjecting only the regions determined in step 2 to further facial feature analysis whereby said regions created in step 1 not having a predominantly skin colour are not subjected to said further feature analysis.

BRIEF DESCRIPTION OF THE DRAWINGS

[0030] A preferred embodiment of the present invention will now be described with reference to the drawings in which:

[0031]FIG. 1 is a schematic representation of the pixels of a colour digital image,

[0032]FIG. 2 shows the segmenting of the image of FIG. 1 into a plurality of regions each having a substantially homogenous colour,

[0033]FIG. 3 is a flow chart of the preferred face detection process, and

[0034]FIG. 4 is a schematic block diagram of a general purpose computer upon which the preferred embodiment of the present invention can be practised.

DETAILED DESCRIPTION INCLUDING BEST MODE FIG. 1 illustrates a typical colour digital image 1 having a size of 832×624 pixels 5 each of which has an RGB value.

[0035] However, rather than consider the image on a pixel by pixel basis as described above in relation to the prior art of Yang and Waibel, the image is segmented into regions 2 as schematically illustrated in FIG. 2 on the basis that all the pixels in each region have substantially the same colour.

[0036] The overall process 30 is illustrated in the flow chart of FIG. 3, and the regional segmentation of the image is carried out at step 31. Next the regions of the image are converted in step 32 into the chromatic colour space (as described above). The next step 33 is to select those of the regions determined in step 31 which have a specified percentage (typically in the range 90-95%) of pixels having a skin colour. These selected regions are then conveniently represented by a boundary box or other boundary indication. Finally, at step 34 the selected regions, including any combinations of overlapping regions, are subjected to a further analysis (preferably not based on skin colour) to determine if the selected region(s) represent a face or faces.

[0037] This initial colour grouping can use any region based colour image segmentation technique. Preferably the image is partitioned into colour regions by seeking connected groups of pixels which have similar colours over a local region. Very small isolated initial spatial groupings can be ignored in order to find major colour regions and reduce a noise effect. A representative colour of each initial spatial region is determined by an average colour value of the region.

[0038] A colour region starts from an arbitrarily chosen pixel which is compared with its neighbouring pixels. The region size is increased by adding neighbouring pixels which are similar in colour, using a colour similarity threshold T. A neighbouring pixel is added to the region if |Rp−Rm|<T and |Gp−Gm|<T and |Bp−Bm<T|, where Rp, Gp, Bp are R, G, B values of the neighbouring pixel and Rm, Gm, Bm represented average R, G, B values of the region.

[0039] When a region has no more neighbouring pixels of similar colour, the region stops growing and represents one of the initial spatial groupings. If the region size is below a predetermined threshold value, it is ignored. A region having a pixel number equal or greater than the predetermined threshold is represented by its average colour.

[0040] Then a new pixel which does not yet belong to any region is chosen to start a new colour region. The process continues until each pixel in the image either belongs to an initial spatial grouping or has been ignored as being part of a small region.

[0041] The initial spatial groupings provide a colour region segmentation of the image with each region being represented by its average colour.

[0042] In this way, for most images where the bulk of the image is not a face, or part of a face, the majority of pixels will be grouped into regions or objects (be they foreground or background, etc) which are clearly not faces. Therefore these non facial objects can be quickly eliminated on the basis of their colour.

[0043] Once the regions have been determined, they are then converted into the “pure” chromatic colour space utilising the equations given above so as to provide r and g values. A generous rule such as a rule that at least 85% of the pixels within a given region be of face colour can be used to select those regions worthy of further examination. Preferably, the test for face colour takes into account the nature of the original image, for example whether the image was taken with or without a flash. This information can be determined from the image source, eg a camera.

[0044] Thereafter, only those selected regions are subjected to a further test to determine the presence of facial features. This further test provides a conclusive determination as to whether or not a region constitutes a face. In this connection, the further test is likely to be computationally slower and therefore the above described elimination of regions ensures that the computationally slow method is only applied to relatively small portions of the overall image. Thus the total processing time is reduced.

[0045] The preferred method of verifying if a region represents a face relies upon edge detection techniques as a means of detecting facial features. In particular facial features such as eyes, eyebrows and mouths often appear as dark bars on a face and thus provide dark edges.

[0046] The preferred form of edge detection is use of an edge detection filter. This utilises two functions operating in orthogonal directions. To detect a horizontal bar a second derivative Gaussian function is used in the vertical direction and a Gaussian function is used in the horizontal direction.

[0047] Once an edge has been determined in this way each detected edge is examined. Any pair of detected edges can be found to be derived from, and thus be indicative of, a pair of eyes, a pair of eyebrows, or an eye and associated eyebrow, depending upon the relative position and size of the detected edges. Similarly, an individual edge can be derived from, and thus be indicative of, a mouth if it is located at an appropriate position relative to the eyes and/or eyebrows already detected.

[0048] Clearly by proceeding in this fashion a given region begins to accumulate facial features building from skin tone through eyebrows/eyes and then to a mouth. The more facial features found for a given region which is a face candidate, the greater the possibility that the candidate actually is a face.

[0049] Furthermore, the above described method has the advantage that it is able to cater for the circumstance where a face is backgrounded against a background region of substantially the same colour. Under these circumstances, in Yang and Waibel's method, no boundary between the face and the background would be likely to be detected. Therefore the region as a whole would be selected for further testing. However, the method of the embodiment of the present invention utilises the full colour space to segment the image, before making decisions about which pixels are skin colour. Consequently the face is more likely to be separated from the background. In addition, the method is naturally independent of orientation or partial occlusion of the face.

[0050] Furthermore, the method permits false positives to be examined at the further stage and therefore does not exclude from subsequent testing regions which are likely to be ultimately determined as a facial region.

[0051] The above described method is preferably practiced using a conventional general-purpose computer system 100, such as that shown in FIG. 4 wherein the processes of FIG. 3 may be implemented as software, such as an application program executing within the computer system 100. In particular, the steps of the method are effected by instructions in the software that are carried out by the computer. The software may be divided into two separate parts; one part for carrying out the above method steps; and another part to manage the user interface between the latter and the user. The software may be stored in a computer readable medium, including the storage devices described below, for example. The software is loaded into the computer from the computer readable medium, and then executed by the computer. A computer readable medium having such software or computer program recorded on it is a computer program product. The use of the computer program product in the computer preferably effects an advantageous apparatus for detecting face candidate regions in accordance with the embodiments of the invention.

[0052] The computer system 100 comprises a computer module 101, etc input devices such as a keyboard 102 and mouse 103, output devices including a printer 115 and a display device 114. A Modulator-Demodulator (Modem) transceiver device 116 is used by the computer module 101 for communicating to and from a communications network 120, for example connectable via a telephone line 121 or other functional medium. The modem 116 can be used to obtain access to the Internet, and other network systems, such as a Local Area Network (LAN) or a Wide Area Network (WAN).

[0053] The computer module 101 typically includes at least one processor unit 105, a memory unit 106, for example formed from semiconductor random access memory (RAM) and read only memory (ROM), input/output (I/O) interfaces including a video interface 107, and an I/O interface 113 for the keyboard 102 and mouse 103 and optionally a joystick (not illustrated), and an interface 108 for the modem 116. A storage device 109 is provided and typically includes a hard disk drive 110 and a floppy disk drive 111. A magnetic tape drive (not illustrated) may also be used. A CD-ROM drive 112 is typically provided as a non-volatile source of data. The components 105 to 113 of the computer module 101, typically communicate via an interconnected bus 104 and in a manner which results in a conventional mode of operation of the computer system 100 known to those in the relevant art. Examples of computers on which the embodiments can be practised include IBM-PC's and compatibles, Sun Sparcstations or alike computer systems evolved therefrom.

[0054] Typically, the application program of the preferred embodiment is resident on the hard disk drive 110 and read and controlled in its execution by the processor 105. Intermediate storage of the program and any data fetched from the network 120 may be accomplished using the semiconductor memory 106, possibly in concert with the hard disk drive 110. In some instances, the application program may be supplied to the user encoded on a CD-ROM or floppy disk and read via the corresponding drive 112 or 111, or alternatively may be read by the user from the network 120 via the modem device 116. Still further, the software can also be loaded into the computer system 100 from other computer readable medium including magnetic tape, a ROM or integrated circuit, a magneto-optical disk, a radio or infra-red transmission channel between the computer module 101 and another device, a computer readable card such as a PCMCIA card, and the Internet and Intranets including email transmissions and information recorded on websites and the like. The foregoing is merely exemplary of relevant computer readable mediums. Other computer readable mediums may be practiced without departing from the scope and spirit of the invention.

[0055] The method of detecting face candidate regions may alternatively be implemented in dedicated hardware such as one or more integrated circuits performing the functions or sub functions of FIG. 3. Such dedicated hardware may include graphic processors, digital signal processors, or one or more microprocessors and associated memories.

Industrial Applicability

[0056] It is apparent from the above that the embodiments of the invention are applicable in fields such as content-based image retrieval, personal identification or verification for use with automatic teller machines or security cameras, or automated interaction between humans and computational devices.

[0057] The foregoing describes only some embodiments of the present invention, and modifications and/or changes can be made thereto without departing from the scope and spirit of the invention as defined in the claims.

[0058] In the context of this specification, the word “comprising” means “including principally but not necessarily solely” or “having” or “including” and not “consisting only of”. Variations of the word comprising, such as “comprise” and “comprises” have corresponding meanings. 

1. A method of detecting a face in a colour digital image, said method comprising the steps of:
 1. segmenting said image into a plurality of regions each having a substantially homogenous colour;
 2. testing the colour of each said region created in step 1 to determine those regions having predominantly skin colour; and
 3. subjecting only the regions determined in step 2 to further facial feature analysis whereby said regions created in step 1 not having a predominantly skin colour are not subjected to said further feature analysis.
 2. The method as claimed in claim 1 including the further step of using in step 2 a colour distribution model utilising previously sampled data.
 3. The method as claimed in claim 1 including the further step of using chromatic colours derived from RGB values in step
 2. 4. The method as claimed in claim 1 wherein said image is from a camera.
 5. The method as claimed in claim 3 or 4 wherein a particular image is selected from the group consisting of images taken with use of a flash, and images taken without use of a flash.
 6. The method as claimed in claim 1 wherein the further facial analysis in step 3 is independent of facial colour.
 7. The method as claimed in claim 5 wherein the further facial analysis comprises edge detection.
 8. The method as claimed in claim 6 wherein said edge detection utilises an edge detection filter comprising second derivative Gaussian function in a first direction substantially orthogonal to the edge to be detected and a Gaussian function in a second direction substantially orthogonal to said first direction.
 9. The method as defined in claim 6 or 7 wherein further facial analysis is carried out utilising the spatial relationship of detected edges.
 10. The method as defined in claim 1 wherein step 1 includes growing a region by determining the average colour of a group of pixels, determining the difference between the average colour of the group and the average colour of pixels adjacent to the group, and, if the colour difference is less than a predetermined threshold, adding the adjacent pixels to the group.
 11. Apparatus for detecting a face in a colour digital image, said apparatus comprising, segmenting means to segment said image into a plurality of regions each having a substantially homogeneous colour, colour detecting means coupled to said segmenting means to determine those regions having predominantly skin colour, analysis means coupled to said colour detection means to subject only those regions having predominantly skin colour to a facial feature analysis.
 12. The apparatus as claimed in claim 10 wherein said colour detection means includes a colour distribution model and storage means storing previously sampled data for use in said colour distribution model.
 13. The apparatus as claimed in claim 11 including chromatic colour calculations means to derive from RGB values of said image, chromatic colour values.
 14. The apparatus as claimed in claim 10 wherein said image is from a camera.
 15. The apparatus as claimed in claim 10 wherein the particular image is selected from the group consisting of images taken with use of a flash, and images taken without use of a flash.
 16. The apparatus as claimed in claim 10 wherein said facial feature analysis of said analysis means is independent of facial colour.
 17. The apparatus is claimed in claim 14 wherein said analysis means includes an edge detector to detect edges in the image.
 18. The apparatus as claimed in claim 15 wherein said analysis means has an edge detection filter comprising second derivative Gaussian function in a first direction substantially orthogonal to the edge to be detected and a Gaussian function in a second direction substantially orthogonal to said first direction.
 19. The apparatus as claimed in claim 15 or 16 wherein said analysis means includes a spatial determinator to determine the spatial relationship of detected edges.
 20. The apparatus as claimed in claim 10 including an accumulator means and a colour difference means to determine the difference between the average colour of a group of pixels and the average colour of pixels adjacent to that group, since that if the colour distance is less than a predetermined threshold, said adjacent pixels are added to said accumulator means to thereby grow a region.
 21. A computer readable medium incorporating a computer program product for detecting a face in a colour digital image, said computer program product including a sequence of computer implementable instructions for carrying out the steps of:
 1. segmenting said image into a plurality of regions each having a substantially homogenous colour;
 2. testing the colour of each said region created in step 1 to determine those regions having predominantly skin colour; and
 3. subjecting only the regions determined in step 2 to further facial feature analysis whereby said regions created in step 1 not having a predominantly skin colour are not subjected to said further feature analysis.
 22. The medium as claimed in claim 19 including the further step of using in step 2 a colour distribution model utilising previously sampled data.
 23. The medium as claimed in claim 19 including the further step of using chromatic colours derived from RGB values in step
 2. 24. The medium as claimed in claim 19 wherein said image is from a camera.
 25. The medium as claimed in claim 19 wherein the particular image is selected from the group consisting of images taken with use of a flash, and images taken without use of a flash.
 26. The method as claimed in claim 19 wherein the further facial analysis in step 3 is independent of facial colour.
 27. The medium as claimed in claim 23 wherein the further facial analysis comprises edge detection.
 28. The medium as claimed in claim 24 wherein said edge detection utilises an edge detection filter comprising second derivative Gaussian function in a first direction substantially orthogonal to the edge to be detected and a Gaussian function in a second direction substantially orthogonal to said first direction.
 29. The medium as defined in claim 24 or 25 wherein further facial analysis is carried out utilising the spatial relationship of detected edges.
 30. The medium as defined in claim 19 wherein step 1 includes growing a region by determining the average colour of a group of pixels, determining the difference between the average colour of the group and the average colour of pixels adjacent to the group, and, if the colour difference is less than a predetermined threshold, adding the adjacent pixels to the group. 